Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Conversation

f-moya
Copy link
Contributor

@f-moya f-moya commented Feb 14, 2022

simplecov_json_formatter's json report now contains an extra key, named groups. This was included on codeclimate-community/simplecov_json_formatter#2 . The current approach for decoding the JSON report into a predefined struct is too rigid due to the use of DisallowUnkownFields().

DisallowUnknownFields causes the Decoder to return an error when the destination is a struct and the input contains object keys which do not match any non-ignored, exported fields in the destination.
Godoc

That explains why the test report will fail to decode the new simplecov_json_formatter report, since it has a new key groups which is not declared on the struct.

This DisallowUknownFields() was use as a strategy to detect when the given simplecov report is on legacy format (simplecov < 0.18). I'm changing the strategy to extract the simplecov version from the test report and make a decision about with simplecov formatter to use based on that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants